Cover TOC Chap Prev Chap Prev Fig Next Fig Next Chap

Chapter 19: Controlling Shading

../ch19/19fig22.gif
Figure 19.22

A square face with two normals pointing along the positive Z axis and two normals pointing along the positive X axis.

19fig22.wrl
Click on the image to view the VRML scene.

#VRML V2.0 utf8
# The VRML 2.0 Sourcebook
# Copyright (c) 1997
# Andrea L. Ames, David R. Nadeau, and John L. Moreland
Shape {
    appearance Appearance {
        material Material { }
    }
    geometry IndexedFaceSet {
        coord Coordinate {
            point [
                -1.0 -1.0  0.0,   1.0 -1.0  0.0,
                 1.0  1.0  0.0,  -1.0  1.0  0.0,
            ]
        }
        coordIndex [ 0, 1, 2, 3 ]
        normalPerVertex TRUE
        normal Normal {
            vector [
                0.0  0.0  1.0,   1.0  0.0  0.0,
                1.0  0.0  0.0,   0.0  0.0  1.0,
            ]
        }
        normalIndex [ 0, 1, 2, 3 ]
    }
}